package com.fenghen.demo01.controller;

import com.fenghen.demo01.config.MyAppconfig;
import com.fenghen.demo01.service.MyAppconfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("config")
public class MyAppconfigController {

    @Autowired
    private MyAppconfigService myAppconfigService;

    @GetMapping("/test")
    public String performAction() {
        myAppconfigService.performAction();
        return "Action performed!";
    }

    @GetMapping("/test1")
    public String testvalue() {
        myAppconfigService.testvalue();
        return "Action performed!";
    }

}
